<template>
  <div>
    <h1>lifeCycleHookFunc 生命周期钩子函数</h1>
    <section>
      父组件更新内容
      <input type="text" v-model="message" /> {{ message }}
    </section>
    <child1 />
    <router-view />
  </div>
</template>

<script>
import child1 from './child1'
export default {
  name: 'parent',
  components: { child1 },
  data() {
    return { message: 'parent....' }
  },
  beforeCreate() {
    console.log('parent beforeCreate....')
  },
  created() {
    console.log('parent created....')
  },
  beforeMount() {
    console.log('parent beforeMount...')
  },
  mounted() {
    console.log('parent mounted...')
  },
  beforeUpdate() {
    console.log('parent beforeUpdate....')
  },
  updated() {
    console.log('parent updated...')
  },
  beforeDestroy() {
    console.log('parent beforeDestroy...')
  },
  destroyed() {
    console.log('parent destroyed...')
  }
}
</script>


<style lang="scss" scoped>
div {
  section {
    input {
      margin-right: 10px;
      border: solid 1px #ddd;
      padding: 6px;
      outline: none;
    }
  }
}
</style>